from os import urandom

DEBUG = True

# 若要使用session，需要设置加密key，确保数据加密后才将session信息放入cookie中
SECRET_KEY = 'qweasdzxcrtyfghvbnuiojklmp'

# 默认是True，数据库模型更改会发送信号，浪费资源
SQLALCHEMY_TRACK_MODIFICATIONS = False

DIALECT = 'mysql'
DRIVER = 'pymysql'
USERNAME = 'root'
PASSWORD = 'Hins4449'
HOST = '127.0.0.1'
PORT = '3306'
DATABASE = 'Live'
SQLALCHEMY_DATABASE_URI = "{}+{}://{}:{}@{}:{}/{}?charset=utf8".format(DIALECT,
                                                                       DRIVER,
                                                                       USERNAME,
                                                                       PASSWORD,
                                                                       HOST,
                                                                       PORT,
                                                                       DATABASE)
